package com.homework.service.impl;

import com.homework.entity.Comment;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.homework.dao.CommentMapper;
import com.homework.service.CommentService;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService{

    @Resource
    private CommentMapper commentMapper;

    @Override
    public List<Comment> findAll() {
        return commentMapper.selectAll();
    }

    @Override
    public int addComment(Comment comment) {
        int i = commentMapper.insertComment(comment);
        return i;
    }
}
